package main

import "fmt"

type Container []interface{}

func (c *Container) Put(elem interface{}) {
	*c = append(*c, elem)
}

func (c *Container) Get() interface{} {
	elem := (*c)[0]
	*c = (*c)[1:]
	return elem
}

func main() {
	containter := &Container{}
	containter.Put(7)
	containter.Put(42)

	elem, ok := containter.Get().(int)
	if !ok {
		fmt.Println("Unable o read an int from IntContainter")
	}
	fmt.Printf("assertExample: %d (%T) \n", elem, elem)
}
